# -*- coding: utf-8 -*-
# @File     : throttling.py
# @Author   : bingjia
# @Time     : 2020/7/30 14:31
# @Desc     : user 模块节流

from ..base.api import throttling


class UserDetailRateThrottle(throttling.SimpleRateThrottle):
    scope = "user-detail"
    throttled_actions = ["by_username", "retrieve"]


class UserUpdateRateThrottle(throttling.UserRateThrottle):
    scope = "user-update"
    throttled_actions = ["update", "partial_update"]